<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  var CheckObject = function () {
    return {
      checkName : function () {
        // 验证姓名
      },
      checkEmail : function () {
        //验证邮箱
        console.log ('email checked');
      },
      checkPassword : function(){
        //验证密码
      }
    }

  }

  var a = CheckObject();
  a.checkEmail ();

  var CheckObject1 = function(){};
  CheckObject1.prototype = {
    checkName : function(){
      // 验证姓名
    },
    checkEmail : function(){
      // 验证邮箱
    },
    checkPassword : function(){
      // 验证密码
      console.log('password checked');
    }
  }
  var b = new CheckObject1();
  b.checkPassword ();

</script>
</body>
</html>